<?php

/**
 * Created by Reliese Model.
 */

namespace App\Models;

use Carbon\Carbon;
use Illuminate\Database\Eloquent\Model;

/**
 * Class TbDocumentImg
 * 
 * @property int $id
 * @property int|null $document_id
 * @property string|null $img_path
 * @property string|null $img_url
 * @property string|null $img_type
 * @property Carbon|null $create_time
 * @property Carbon|null $update_time
 * 
 * @property TbDocument|null $tb_document
 *
 * @package App\Models
 */
class TbDocumentImg extends Model
{
	protected $table = 'tb_document_img';

	protected $casts = [
		'document_id' => 'int'
	];

	protected $fillable = [
		'document_id',
		'img_path',
		'img_url',
		'img_type'
	];

	public function tb_document()
	{
		return $this->belongsTo(TbDocument::class, 'document_id');
	}
}
